package com.medica.ledproject.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * LED屏幕
 * </p>
 *
 * @author xiaona
 * @since 2024-05-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("dz_park_ledscree")
@Tag(name="DzParkLedscree对象", description="LED屏幕")
public class DzParkLedscree implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "设备名称")
    private String name;

    @Schema(description = "设备状态 1开启  2关闭")
    private Integer status;
    @Schema(description = "删除状态 0正常 -1 删除")
    private Integer isDel;
    @Schema(description = "灯杆id")
    private Integer lampId;

    @Schema(description = "设备图片")
    private String image;

    @Schema(description = "设备唯一标识")
    private String uniqCode;

    @Schema(description = "设备IP")
    private String ip;

    @Schema(description = "上次操作时间")
    private LocalDateTime lasttime;

    @Schema(description = "创建时间")
    private LocalDateTime createtime;

    public void setInfo(ReDzParkLedscree dzParkLedscree) {
        this.name = dzParkLedscree.getName();
        this.image = dzParkLedscree.getImage();
        this.uniqCode = dzParkLedscree.getUniqCode();
        this.ip = dzParkLedscree.getIp();
        this.lampId = dzParkLedscree.getLampId();
        this.createtime=LocalDateTime.now();
    }
}
